package rui.game.listerner;

import rui.game.component.function.Exit;

import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

public class WindowClose extends WindowAdapter {
    private Exit exit;

    public WindowClose(Exit exit) {
        this.exit = exit;
    }

    @Override
    public void windowClosing(WindowEvent e) {
        exit.doClick();
    }
}